<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Boot from Host (AR7400)</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="keywords" content="Intellon, Atheros, Qualcomm, HomePlug, powerline, communications, INT6000, INT6300, INT6400, AR7400, AR7420"><link rel="home" href="index.html" title="Qualcomm Atheros Open Powerline Toolkit"><link rel="up" href="ch04.html" title="Chapter 4.  Firmware"><link rel="prev" href="ch04s14.html" title="Boot from Host (INT6400)"><link rel="next" href="ch04s16.html" title="Boot from Host (AR7420)"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">
			Boot from Host (AR7400)
			</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s14.html">Prev</a> </td><th width="60%" align="center">Chapter 4. 
		Firmware 
		</th><td width="20%" align="right"> <a accesskey="n" href="ch04s16.html">Next</a></td></tr></table><hr></div><div class="section" title="Boot from Host (AR7400)"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="firmware-7400-boot"></a>
			Boot from Host (AR7400)
			</h2></div></div></div><p>
			The <span class="productname">AR7400</span>™ boot-from-host method downloads and executes a device configuration applet then downloads runtime parameters and firmware from a local host and starts firmware execution. This method is initiated by the <span class="application">Bootloader</span> after reset on a device having no flash memory, blank flash memory or corrupted flash memory. The method requires <span class="application">Bootloader</span> aware software running on the local host in order to complete.
			</p><p>
			The <span class="productname">AR7400</span>™ boot-from-host method is similar to the <span class="productname">INT6400</span>™ boot-from-host method but it uses the <code class="constant">VS_WRITE_AND_EXECUTE</code> message instead of the <code class="constant">VS_WR_MEM</code> message write into SDRAM and start firmware execution. This eliminates the need for the <code class="constant">VS_ST_MAC</code> message. The <code class="constant">VS_WR_MEM</code> and <code class="constant">VS_ST_MAC</code> message types will no longer be recognized by bootloaders after the <span class="productname">QCA7420</span>™ chipset. 
			</p><p>
			The <span class="productname">AR7400</span>™ boot-from-host method works on <span class="productname">AR6400</span>™ and will continue to work on <span class="productname">QCA7420</span>™ and planned successors. Customers should implement this boot-from-host method now to avoid building obsolete products.
			</p><p>
			The <span class="productname">AR7400</span>™ does not have a unique hardware address until the firmware starts and assigns one read from the PIB. Until that time, the <span class="application">Bootloader</span> will only acknowledge messages addressed to 00:B0:52:00:00:01. In addition, the <span class="application">Bootloader</span> does not know the hardware address of the local host and so it addresses all <code class="constant">VS_HOST_ACTION</code> messages to FF:FF:FF:FF:FF:FF; however, these messages are not transmitted over the powerline.
			</p><div class="figure"><a name="idp21599024"></a><p class="title"><b>Figure 4.7. 
				Boot from Host (AR7400)
				</b></p><div class="figure-contents"><pre class="programlisting">

          AR7400                             LOCAL-HOST
        [01] |                                    |
        [02] |-------- VS_HOST_ACTION.IND -------&gt;| [03]
        [05] |&lt;------- VS_HOST_ACTION.RSP --------| [04]
             |                                    | [06]
             |&lt;---- VS_WRITE_AND_EXECUTE.REQ -----| [07]
        [08] |----- VS_WRITE_AND_EXECUTE.CNF ----&gt;|      
             |&lt;-----------------------------------| [09]
        [10] |-----------------------------------&gt;| [11]
        [12] |                                    | 
        [13] |-------- VS_HOST_ACTION.IND -------&gt;| [14]
        [16] |&lt;------- VS_HOST_ACTION.RSP --------| [15]
             |                                    | [16]
             |&lt;-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [17]
        [18] |--VS_WRITE_AND_EXECUTE_APPLET.CNF -&gt;|     
             |&lt;-----------------------------------| [19]
        [20] |-----------------------------------&gt;| 
             |&lt;-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [21]
        [22] |--VS_WRITE_AND_EXECUTE_APPLET.CNF -&gt;|     
             |&lt;-----------------------------------| [23]
        [24] |-----------------------------------&gt;| 
        [25] |                                    |

 </pre></div></div><br class="figure-break"><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
					The bootloader automatically starts after device reset and attempts to read the runtime firmware image from flash memory, write it into <acronym class="acronym">SDRAM</acronym> and start execution. If it succeeds then normal operation begins and no further action is required. If it fails, for any reason, then the bootloader initiates the boot-from-host sequence.
					</p></li><li class="listitem"><p>
					The bootloader broadcasts <code class="constant">VS_HOST_ACTION.IND</code> with <code class="varname">HOST_ACTION_REQ</code> set to <code class="constant">0x04</code> to indicate that it is waiting to be configured. The bootloader continues to broadcast this message message every <code class="constant">750</code> milliseconds which differs from that of other chips.
					</p></li><li class="listitem"><p>
					The local host receives the <code class="constant">VS_HOST_ACTION.IND</code> and inspects <code class="varname">HOST_ACTION_REQ</code> field to determine the required action. The local host must be programmed to listen and act appropriately.
					</p></li><li class="listitem"><p>
					The local host sends a <code class="constant">VS_HOST_ACTION.RSP</code> message with <code class="varname">MSTATUS</code> set to <code class="constant">0</code> to indicate the start of sequence. 
					</p></li><li class="listitem"><p>
					The bootloader receives the <code class="constant">VS_HOST_ACTION.RSP</code> message, stops broadcasting <code class="constant">VS_HOST_ACTION.IND</code> messages and waits indefinitely for the local host to act. 
					</p></li><li class="listitem"><p>
					The local host retrieves the firmware chain and extracts the configuration applet image from the chain. The firmware chain may be stored on disk or in memory depending on how the local host is programmed.
					</p></li><li class="listitem"><p>
					The local host sends a <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message with <code class="varname">FLAGS</code> set to <code class="constant">2</code> and <code class="varname">ALLOWED_MEM_TYPES</code> to <code class="constant">1</code> to download the applet in absolute address mode. Alternately, setting <code class="varname">FLAGS</code> to <code class="constant">0</code> and <code class="varname">CURR_PART_OFFSET</code> to <code class="constant">0</code> will download the applet in relative address mode. The <code class="varname">TOTAL_LENGTH</code> will be the applet image header <code class="varname">IMAGELENGTH</code> but <code class="varname">CURR_PART_LENGTH</code> cannot exceed <code class="constant">1400</code> bytes.
					</p></li><li class="listitem"><p>
					The bootloader acknowledges each <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message with a <code class="constant">VS_WRITE_AND_EXECUTE.CNF</code> message having <code class="varname">MSTATUS</code> set to <code class="constant">0</code>.
					</p></li><li class="listitem"><p>
					The local host continues to increment <code class="varname">CURR_PART_OFFSET</code> and download the configuration applet in <code class="constant">1400</code> byte blocks until the last block is reached. The local host then sets <code class="varname">START_ADDR</code> to the applet image header <code class="varname">ENTRYPOINT</code>, the <code class="varname">CHECKSUM</code> to the applet image header <code class="varname">IMAGECHECKSUM</code> and the execute bit in <code class="varname">FLAGS</code> to <code class="constant">1</code> in the last message frame.
					</p></li><li class="listitem"><p>
					The bootloader receives the last <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message, confirms the configuration applet checksum then acknowledges with a <code class="constant">VS_WRITE_AND_EXECUTE.CNF</code> message having <code class="varname">MSTATUS</code> set to <code class="constant">0</code>.
					</p></li><li class="listitem"><p>
					The local host exists the boot from host sequence and returns to listening mode.
					</p></li><li class="listitem"><p>
					The bootloader executes the configuration applet. The device hardware address is <code class="constant">00:B0:52:00:00:01</code> in this state.
					</p></li><li class="listitem"><p>
					The bootloader broadcasts a <code class="constant">VS_HOST_ACTION.IND</code> message with <code class="varname">HOST_ACTION_REQ</code> set to <code class="constant">0</code> to indicate that it is waiting for runtime parameters and firmware. 
					</p></li><li class="listitem"><p>
					The local host receives a <code class="constant">VS_HOST_ACTION.IND</code> message and inspects the <code class="varname">HOST_ACTION_REQ</code> field to determine the required action. The local host must be programmed to listen and act appropriately.
					</p></li><li class="listitem"><p>
					The bootloader receives the <code class="constant">VS_HOST_ACTION.RSP</code> message, stops broadcasting <code class="constant">VS_HOST_ACTION.IND</code> messages and waits indefinitely for the local host to act. 
					</p></li><li class="listitem"><p>
					The local host locates the parameter chain and firmware chain. The chains may be stored on disk or in memory depending on how the local host is programmed.
					</p></li><li class="listitem"><p>
					The local host sends a <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message with <code class="varname">FLAGS</code> set to <code class="constant">2</code> and <code class="varname">ALLOWED_MEM_TYPES</code> set to <code class="constant">1</code> to download parameters in absolute address mode. Alternately, setting <code class="varname">FLAGS</code> to <code class="constant">0</code> and <code class="varname">CURR_PART_OFFSET</code> to <code class="constant">0</code> will download parameters in relative address mode. The <code class="varname">TOTAL_LENGTH</code> will be the entire parameter file length but the <code class="varname">CURR_PART_LENGTH</code> cannot exceed <code class="constant">1400</code> bytes.
					</p></li><li class="listitem"><p>
					The bootloader acknowledges each <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message with a <code class="constant">VS_WRITE_AND_EXECUTE.CNF</code> message having <code class="varname">MSTATUS</code> set to <code class="constant">0</code>.
					</p></li><li class="listitem"><p>
					The local host continues to <code class="varname">CURR_PART_OFFSET</code> and download the parameter chain in <code class="constant">1400</code> byte blocks until the last block is reached. The local host then sets the <code class="varname">START_ADDR</code> field to the parameter image header <code class="varname">ENTRYPOINT</code>, the <code class="varname">CHECKSUM</code> to the parameter image header <code class="varname">IMAGECHECKSUM</code> and the execute bit in <code class="varname">FLAGS</code> to <code class="constant">1</code> in the last message frame.
					</p></li><li class="listitem"><p>
					The bootloader receives the last <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message, confirms the parameter chain checksum and acknowledges with a <code class="constant">VS_WRITE_AND_EXECUTE.CNF</code> message having <code class="varname">MSTATUS</code> set to <code class="constant">0</code>.
					</p></li><li class="listitem"><p>
					The local host sends a <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message with <code class="varname">FLAGS</code> set to <code class="constant">2</code> and <code class="varname">ALLOWED_MEM_TYPES</code> to <code class="constant">1</code> to download firmware in absolute address mode. Alternately, setting <code class="varname">FLAGS</code> to <code class="constant">0</code> and <code class="varname">CURR_PART_OFFSET</code> to <code class="constant">0</code> will download firmware in relative address mode. The <code class="varname">TOTAL_LENGTH</code> will be the firmware image header <code class="varname">IMAGELENGTH</code> but the <code class="varname">CURR_PART_LENGTH</code> cannot exceed <code class="constant">1400</code> bytes.
					</p></li><li class="listitem"><p>
					The bootloader acknowledges each <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message with a <code class="constant">VS_WRITE_AND_EXECUTE.CNF</code> message having the <code class="varname">MSTATUS</code> field set to <code class="constant">0</code>.
					</p></li><li class="listitem"><p>
					The local host continues to increment <code class="varname">CURR_PART_OFFSET</code> and download the parameter chain in <code class="constant">1400</code> byte blocks until the last block is reached. The local host then sets <code class="varname">START_ADDR</code> to the parameter image header <code class="varname">ENTRYPOINT</code>, the <code class="varname">CHECKSUM</code> to the parameter image header <code class="varname">IMAGECHECKSUM</code> and the execute bit in <code class="varname">FLAGS</code> to <code class="constant">1</code> in the last message frame.
					</p></li><li class="listitem"><p>
					The bootloader receives the last <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message, confirms the firmware chain checksum and acknowledges with a <code class="constant">VS_WRITE_AND_EXECUTE.CNF</code> message having the <code class="varname">MSTATUS</code> field set to <code class="constant">0</code>.
					</p></li><li class="listitem"><p>
					The bootloader executes the runtime firmware and the device begins operation. The device hardware address will become that programmed into the parameter inforamtion block.
					</p></li></ol></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s14.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch04s16.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">
			Boot from Host (INT6400)
			 </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 
			 Boot from Host (AR7420)
			</td></tr></table></div></body></html>
